feat(sdk): add otel support#177
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
lan17
left a comment
There was a problem hiding this comment.
I like having a built-in OTEL path, but I don't think this version is safe to merge yet. Right now the SDK can tell callers observability is working while the OTEL sink is effectively inert, and the caching logic doesn't compose cleanly with the new otel_* settings. I'd also mark failed control executions as OTEL errors rather than only attaching an exception object.
|
@lan17 Thanks, this was a good catch. I fixed the three unsafe parts you called out: The built-in otel sink no longer counts as active when it can’t actually export. If OTEL is disabled, deps are missing, or there’s no exporter configuration, we now treat that sink as inert for observability selection instead of reporting observability as working. |
… feature/61578-add-otel-support
lan17
left a comment
There was a problem hiding this comment.
Nice work on tightening up the earlier OTEL issues. I found one remaining opt-out case that I think should be fixed before merge: an explicit observability_enabled=False can still leave the selected OTEL sink active for later writes.
lan17
left a comment
There was a problem hiding this comment.
Thanks for working through the review feedback, Namrata. I did a fresh pass from the latest head, including the opt-out path and the OTEL sink/cache behavior, and this looks good to me now.
Summary
Added configurable observability sink selection for the Python SDK and server so control events can be routed to the default backend, registered custom sinks, or named sink factories.
Added a built-in OpenTelemetry sink for the SDK, including OTLP configuration via settings/environment variables.
Updated docs and exports so custom sink registration and OTEL usage are available as public integration points.
Scope
User-facing/API changes:
observability_sink_nameandobservability_sink_configto SDK initialization/configurationotelextra and OTEL-related environment variablesInternal changes:
telemetry/Out of scope:
Risk and Rollout
Risk level: medium
Rollback plan: Revert the sink-selection/OTEL changeset to restore the previous default SDK-to-server observability path only. If needed, disable custom routing by keeping
observability_sink_name=defaultand not installing/configuring theotelextra.Testing
make check— typecheck was attempted but full localmake checkwas not run becauseuvwas unavailable in this environmentChecklist